Robustly run binaries and tests after compilation
authorAlex Crichton <alex@alexcrichton.com>
Thu, 7 Aug 2014 00:50:55 +0000 (17:50 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 7 Aug 2014 01:46:23 +0000 (18:46 -0700)
commitef28cd2d97a624aff5320c6ea71f6ca2b06c606c
tree94b3fbc57ee9784137cdf5285e020bcf367f9444
parent00592d434da9b69626faa39a2bbe3cb54ee21f4c
Robustly run binaries and tests after compilation

These were previously just run by executing the raw binary, but this didn't
ensure that any of the necessary paths were in the dylib search path for the
host platform.

This commit enhances the return type of `compile_targets` to have information
about the result of compilation, along with the ability to spawn correctly
configured processes.

This primarily fixes `cargo test` and `cargo run` whenever dynamic dependencies
are involved, but it also fixes the two commands whenever there's a native
dynamic dependency involved as well.
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_run.rs
src/cargo/ops/cargo_rustc/compilation.rs [new file with mode: 0644]
src/cargo/ops/cargo_rustc/context.rs
src/cargo/ops/cargo_rustc/fingerprint.rs
src/cargo/ops/cargo_rustc/mod.rs
src/cargo/ops/cargo_test.rs
src/cargo/ops/mod.rs
tests/test_cargo_run.rs
tests/test_cargo_test.rs
tests/test_cargo_version.rs